﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<SisocanaFronEnd.Models.MissingPersonViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Report a missing person
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <script src="<%: Url.Content("~/Scripts/jquery.validate.min.js") %>" type="text/javascript"></script>
    <script src="<%: Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js") %>" type="text/javascript"></script>
    <% Html.EnableClientValidation(); %>

    <h2>Report missing person</h2>
    <div id="containerCenter">
        <% Html.BeginForm("MissingPerson", "Person", FormMethod.Post, new { enctype = "multipart/form-data" }); %>
        <div id="leftCenter">
              
            <%= Html.EditorFor(model => model.Persona) %>

            <fieldset><legend>Photo</legend>
                <div id="photo-holder"></div>

                <%= Html.Div("editor-label", Html.Label("photo", "Upload a photo")) %>
                <div class="editor-field">
                    <input id="photo" type="file" name="photo" />
                </div>
            </fieldset>

            <%= Html.EditorFor(model => model.HomeAddress) %>
        </div>
        <div id="rightCenter">

            <%= Html.EditorFor(model => model.Reporte) %>

            <input type="submit" value="Save information" />             
        </div>
        <% Html.EndForm(); %>
    </div>

</asp:Content>

<asp:Content ID="ContentCSS" ContentPlaceHolderID="CSSContent" runat="server">
    <link href="<%: Url.Content("~/Content/themes/base/jquery.ui.all.css") %>" rel="stylesheet" type="text/css" />
    <script src="<%: Url.Content("~/Scripts/jquery-ui-1.8.11.min.js") %>" type="text/javascript"></script>
    <script src="<%: Url.Content("~/Scripts/googlemap.js") %>" type="text/javascript"></script>
    <script src="<%: Url.Content("~/Scripts/photoPreviewHtml5.js") %>" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $(".datePicker").datepicker({ dateFormat: 'dd/mm/yy' });
            photoPreview("photo-holder", "photo");
        }); 
    </script>
</asp:Content>

<script runat="server">
    protected void Page_PreInit(Object sender, EventArgs e)
    {
        Master.MasterPageFile = Url.Content(ViewBag.Site.dir_master);
        MasterPage UserMaster = Master.Master;
        UserMaster.FindControl("NewsTitleContent").Visible = false;
        UserMaster.FindControl("VideoTitleContent").Visible = false;
        UserMaster.FindControl("ImageTitleContent").Visible = false;
    }
</script>